package net.factoryOpen.quickfactory.manufacturing.exe.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import net.factoryOpen.quickfactory.manufacturing.exe.mapper.ExeMlStockinMapper;
import net.factoryOpen.quickfactory.manufacturing.exe.domain.ExeMlStockin;
import net.factoryOpen.quickfactory.manufacturing.exe.service.IExeMlStockinService;

import net.factoryOpen.quickfactory.system.mapper.SysBillFrozenMapper;

/**
 * 产成品入库Service业务层处理
 * 
 * @author factoryOpen
 * @date 2024-07-04
 */
@Service
public class ExeMlStockinServiceImpl implements IExeMlStockinService 
{
    @Autowired(required = false)
    private ExeMlStockinMapper exeMlStockinMapper;

    /**
     * 查询产成品入库
     * 
     * @param id 产成品入库主键
     * @return 产成品入库
     */
    @Override
    public ExeMlStockin selectExeMlStockinById(Long id)
    {
        return exeMlStockinMapper.selectExeMlStockinById(id);
    }

    /**
     * 查询产成品入库列表
     * 
     * @param exeMlStockin 产成品入库
     * @return 产成品入库
     */
    @Override
    public List<ExeMlStockin> selectExeMlStockinList(ExeMlStockin exeMlStockin)
    {
        return exeMlStockinMapper.selectExeMlStockinList(exeMlStockin);
    }

    /**
     * 新增产成品入库
     * 
     * @param exeMlStockin 产成品入库
     * @return 结果
     */
    @Override
    public int insertExeMlStockin(ExeMlStockin exeMlStockin)
    {
        exeMlStockin.setCreateTime(DateUtils.getNowDate());
        return exeMlStockinMapper.insertExeMlStockin(exeMlStockin);
    }

    /**
     * 修改产成品入库
     * 
     * @param exeMlStockin 产成品入库
     * @return 结果
     */
    @Override
    public int updateExeMlStockin(ExeMlStockin exeMlStockin)
    {
        exeMlStockin.setUpdateTime(DateUtils.getNowDate());
        return exeMlStockinMapper.updateExeMlStockin(exeMlStockin);
    }

    /**
     * 批量删除产成品入库
     * 
     * @param ids 需要删除的产成品入库主键
     * @return 结果
     */
    @Override
    public int deleteExeMlStockinByIds(Long[] ids)
    {
        return exeMlStockinMapper.deleteExeMlStockinByIds(ids);
    }

    /**
     * 删除产成品入库信息
     * 
     * @param id 产成品入库主键
     * @return 结果
     */
    @Override
    public int deleteExeMlStockinById(Long id)
    {
        return exeMlStockinMapper.deleteExeMlStockinById(id);
    }
}
